﻿@model List<MyCompanyName.AbpZeroTemplate.Prm.Project.Dto.WeekSummaryDataDto>
@{
    var WebRoot = ViewBag.WebRoot;
    ViewBag.Title = "";
    Layout = null;
    var adminIds = Model.Select(x => x.AdminId).Distinct().ToList();
}
<title></title>
<style type="text/css">
    /*

        TableCloth
        by Alen Grakalic, brought to you by cssglobe.com

    */

    /* general styles */

    .summarydiv table, .summarydiv td {
        font: 100% Arial, Helvetica, sans-serif;
    }

    .summarydiv table {
        width: 100%;
        border-collapse: collapse;
        margin: 1em 0;
    }

    .summarydiv th, .summarydiv td {
        text-align: left;
        padding: .5em;
        border: 1px solid #fff;
    }

    .summarydiv th {
        background: #328aa4 url(tr_back.gif) repeat-x;
        color: #fff;
    }

    .summarydiv td {
        background: #e5f1f4;
    }
</style>
<script type="text/javascript">
  
</script>
<div class="summarydiv">
    @foreach (var adminId in adminIds)
    {
        var reports = Model.Where(x => x.AdminId == adminId).OrderBy(x => x.PlanEnd).ToList();
        <hr />
        <p>@reports[0].Admin</p>
        //| 项目编号 | 预计完成（顺序）| 进度（%）
        //    | 阶段进展（已完成个数/所有个数）
        //    | 文档数（本周提交数/累计上传文档数据）
        //        | 问题（本周新增/所有问题数）
        //            |任务数（本周完成|本周新增）

        <table>
            <tr><th rowspan="2">项目编号</th><th rowspan="2">预计完成</th><th rowspan="2">进度</th><th colspan="2">阶段进展</th><th colspan="2">文档</th><th colspan="2">问题</th><th colspan="2">任务</th></tr>
            <tr><th>已完成</th><th>所有</th><th>本周新增</th><th>所有</th><th>本周新增</th><th>所有</th><th>本周新增</th><th>本周完成</th></tr>

            @foreach (var report in reports)
            {
                <tr  style="cursor:pointer;">
                    <td><a  target="_blank" href="@WebRoot/PRM/home/index#app.prm.detail.Index/@report.ProId">@report.ProNo</a> </td>
                    <td>@report.PlanEnd.ToShortDateString()</td>
                    <td>@report.DoingRate</td>
                    <td>@report.FinishedPhase</td>
                    <td>@report.TotalPhase</td>
                    <td>@report.LastUploadDocCount</td>
                    <td>@report.AllDocCount</td>
                    <td>@report.LastAddQuestionCount</td>
                    <td>@report.AllQuestionCount</td>
                    <td>@report.LastAddTaskCount</td>
                    <td>@report.LastFinishTaskCount</td>
                        </tr>
            }

        </table>
    }
</div>